﻿using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using StackExchange.Redis;
using Volo.Abp.Account;
using Volo.Abp.AutoMapper;
using Volo.Abp.FeatureManagement;
using Volo.Abp.Identity;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement;
using Volo.Abp.SettingManagement;
using Volo.Abp.TenantManagement;

namespace Himp.Platform;

[DependsOn(
    typeof(PlatformDomainModule),
    typeof(AbpAccountApplicationModule),
    typeof(PlatformApplicationContractsModule),
    typeof(AbpIdentityApplicationModule),
    typeof(AbpPermissionManagementApplicationModule),
    typeof(AbpTenantManagementApplicationModule),
    typeof(AbpFeatureManagementApplicationModule),
    typeof(AbpSettingManagementApplicationModule)
    )]
public class PlatformApplicationModule : AbpModule
{
    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        Configure<AbpAutoMapperOptions>(options =>
        {
            options.AddMaps<PlatformApplicationModule>();
        });

        // 从配置文件中读取 Redis 连接字符串
        //var redisConnectionString = context.Services.GetConfiguration().GetConnectionString("Redis");
        // 注册 Redis 连接
        //context.Services.AddSingleton(ConnectionMultiplexer.Connect(redisConnectionString));


    }
}
